Disable log scale for negative or non-unique values for Histograms#13496
Disable log scale for negative or non-unique values for Histograms#13496eilskra wants to merge 1 commit intoequinor:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13496 +/- ##
==========================================
+ Coverage 89.90% 89.96% +0.05%
==========================================
Files 460 460
Lines 32372 32406 +34
==========================================
+ Hits 29105 29153 +48
+ Misses 3267 3253 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Needs a backport to |
e8e6b05 to
ed65c06
Compare
This comment was marked as resolved.
This comment was marked as resolved.
8b85b09 to
1e32a39
Compare
3786c20 to
29da8f8
Compare
|
The "when for" in the commit title does not really make sense, can you reword? |
Prevent log scale button for non-unique values, type checking of distribution == "CONST" does not catch all.
| # distribution is not set as CONSTANT | ||
| if not numeric.empty and ( | ||
| numeric.le(0).any().any() or numeric.nunique().le(1).all() | ||
| ): |
There was a problem hiding this comment.
Do we want to disable log_scale for single realization runs?
There was a problem hiding this comment.
Is it not equivalent of a constant distribution?
There was a problem hiding this comment.
It would look the same as a constant distribution with the same min/max, but i dont think it would be the same. I guess it wouldnt be of much value to log_scale a single value, but it is something be currently support..
| ensemble_to_data_map[ensemble] = result | ||
|
|
||
| negative_values_in_data = False | ||
| negative_or_non_unique_values_in_data = False |
There was a problem hiding this comment.
Can we change this to negative_values_in_data_or_all_same_value? I think it reads a bit better. Alternatively, should we have this as two different flags (or maybe even three - empty_data as well)
Issue
Resolves #12527
Approach
Set log scale button visibility to
Falsefor non-unique values, as the type checking ofdistribution == "CONST"does not catch non-unique values (e.g single realization runs).Removed +- 0.5 in
_plotHistogram(), as this is condition will never be met sincemin == maxand transformation already completed previously inplotHistogram()git rebase -i main --exec 'just rapid-tests')When applicable